package cn.buk.api.ctrip.dto.tbooking;

import cn.buk.api.ctrip.util.xstream.MyDateConverter;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;

import java.util.Date;

@XStreamAlias("FlightInfo")
public class OrderFlightInfo {

    @XStreamAlias("Sequence")
    private int sequence;

    @XStreamAlias("Flight")
    private String flightNo;

    @XStreamAlias("Class")
    private String cabinClass;

    @XStreamAlias("SubClass")
    private String subClass;

    @XStreamAlias("DPort")
    private String dport;

    @XStreamAlias("APort")
    private String aport;

    @XStreamAlias("TakeOffTime")
    @XStreamConverter(value = MyDateConverter.class, strings = {"yyyy-MM-dd'T'HH:mm:ss"})
    private Date takeOffTime;

    @XStreamAlias("RecordNo")
    private String pnrNo;

    @XStreamAlias("PolicyCode")
    private String policyCode;

    public int getSequence() {
        return sequence;
    }

    public void setSequence(int sequence) {
        this.sequence = sequence;
    }

    public String getFlightNo() {
        return flightNo;
    }

    public void setFlightNo(String flightNo) {
        this.flightNo = flightNo;
    }

    public String getCabinClass() {
        return cabinClass;
    }

    public void setCabinClass(String cabinClass) {
        this.cabinClass = cabinClass;
    }

    public String getSubClass() {
        return subClass;
    }

    public void setSubClass(String subClass) {
        this.subClass = subClass;
    }

    public String getDport() {
        return dport;
    }

    public void setDport(String dport) {
        this.dport = dport;
    }

    public String getAport() {
        return aport;
    }

    public void setAport(String aport) {
        this.aport = aport;
    }

    public Date getTakeOffTime() {
        return takeOffTime;
    }

    public void setTakeOffTime(Date takeOffTime) {
        this.takeOffTime = takeOffTime;
    }

    public String getPnrNo() {
        return pnrNo;
    }

    public void setPnrNo(String pnrNo) {
        this.pnrNo = pnrNo;
    }

    public String getPolicyCode() {
        return policyCode != null ? policyCode.trim() : null;
    }

    public void setPolicyCode(String policyCode) {
        this.policyCode = policyCode;
    }
}
